package cn.agiledata.bank.audit.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class AuditGroupForm extends ActionForm {
    private Long id;

    private String name;

    private String remark;

    private long[] availableAuditors;

    private long[] selectedAuditors;

    public long[] getAvailableAuditors() {
        return this.availableAuditors;
    }

    public void setAvailableAuditors(long[] auditors) {
        this.availableAuditors = auditors;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        if (name != null)
            name = name.trim();
        this.name = name;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        if (remark != null)
            remark = remark.trim();
        this.remark = remark;
    }

    public long[] getSelectedAuditors() {
        return this.selectedAuditors;
    }

    public void setSelectedAuditors(long[] selectedAuditors) {
        this.selectedAuditors = selectedAuditors;
    }

    public void reset(ActionMapping mapping, HttpServletRequest request) {
        this.setId(null);
        this.setName(null);
        this.setRemark(null);
        this.setAvailableAuditors(new long[0]);
        this.setSelectedAuditors(new long[0]);
    }
}
